﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace HeliGame
{
    public struct WallVertex
    {
        public Vector3 position;
        public Color color;
        public Vector3 normal;
        public Vector2 textureCoordinate;

        public WallVertex(Vector3 position, Vector3 normal, Color color, Vector2 textureCoordinate)
        {
            this.position = position;
            this.normal = normal;
            this.color = color;
            this.textureCoordinate = textureCoordinate;
        }

        public readonly static VertexDeclaration VD =
            new VertexDeclaration
                (
                    new VertexElement(0, VertexElementFormat.Vector3, VertexElementUsage.Position, 0), //3 floaty = 4*3 = 12 bajtów
                    new VertexElement(12, VertexElementFormat.Color, VertexElementUsage.Color, 0), //4 bajty
                    new VertexElement(16, VertexElementFormat.Vector3, VertexElementUsage.Normal, 0), //3 floaty = 4*3 = 12 bajtów
                    new VertexElement(28, VertexElementFormat.Vector2, VertexElementUsage.TextureCoordinate, 0) //2 floaty = 4*2 = 8 bajtów
                );
    }
}
